<template>
	<div class="list">
		<p>{{$store.state.List.name}}</p>
		<p>{{getName}}1</p>
		<p>{{$store.state.name}}</p>
		<button @click="setName">获取+</button>
	</div>
</template>

<script>
	import { mapActions } from 'vuex'
	export default{
		name:'List',
		computed:{
			getName(){
				return this.$store.getters['List/getName']
			}
		},
		methods:{
			setName(){
				// console.log(this.$store.state)
				this.$store.dispatch('List/setName')
			}
			// ...mapActions({setName:'List/setName'})
		}
	}
</script>

<style>
</style>
